Telegram Group & Telegram Channel
⚡️ Фича дня: if consteval в C++23

Хотите разный код для compile-time и runtime? C++23 добавляет if consteval для условной компиляции!


🔴 До: Сложные трюки

template<typename T>
constexpr T compute() {
if (std::is_constant_evaluated()) {
return compile_time_version<T>();
}
return runtime_version<T>();
}



🟢 После: Читаемый consteval

template<typename T>
constexpr T compute() {
if consteval {
return compile_time_version<T>();
} else {
return runtime_version<T>();
}
}



❗️Практические применения:

• Оптимизированные математические библиотеки
• Compile-time криптография
• Генерация lookup-таблиц


💡Используете метапрограммирование в ваших проектах?

Библиотека C/C++ разработчика #буст
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/cppproglib/5782
Create:
Last Update:

⚡️ Фича дня: if consteval в C++23

Хотите разный код для compile-time и runtime? C++23 добавляет if consteval для условной компиляции!


🔴 До: Сложные трюки

template<typename T>
constexpr T compute() {
if (std::is_constant_evaluated()) {
return compile_time_version<T>();
}
return runtime_version<T>();
}



🟢 После: Читаемый consteval

template<typename T>
constexpr T compute() {
if consteval {
return compile_time_version<T>();
} else {
return runtime_version<T>();
}
}



❗️Практические применения:

• Оптимизированные математические библиотеки
• Compile-time криптография
• Генерация lookup-таблиц


💡Используете метапрограммирование в ваших проектах?

Библиотека C/C++ разработчика #буст

BY Библиотека C/C++ разработчика | cpp, boost, qt




Share with your friend now:
tg-me.com/cppproglib/5782

View MORE
Open in Telegram


Библиотека C C разработчика | cpp boost qt Telegram | DID YOU KNOW?

Date: |

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

In many cases, the content resembled that of the marketplaces found on the dark web, a group of hidden websites that are popular among hackers and accessed using specific anonymising software.“We have recently been witnessing a 100 per cent-plus rise in Telegram usage by cybercriminals,” said Tal Samra, cyber threat analyst at Cyberint.The rise in nefarious activity comes as users flocked to the encrypted chat app earlier this year after changes to the privacy policy of Facebook-owned rival WhatsApp prompted many to seek out alternatives.Библиотека C C разработчика | cpp boost qt from id


Telegram Библиотека C/C++ разработчика | cpp, boost, qt
FROM USA